<extend name="Common/common"/>
<block name="main">
    <div class="P_con clinicNopower doctorMag">
        <div class="P_main">
            <ul>
                <volist name="activitys" id="activity">
            <li style="padding-left: 0.8rem">
                        <p class="ov_h info">
                            <span class="left c_333">{$activity.activity_name}</span>
                            <em class="right c_red delete" data-id="{$activity.id}">删除</em>
                        </p>

                        <p>活动地点：</br><span  class="word c_999">{$activity.activity_place}</span></p>
                        <p>活动要求：</br><span  class="word c_999">{$activity.activity_require}</span></p>
                        <p>活动时间：</br><span  class="word c_999">{$activity.activity_time}</span></p>
                        <p>活动限额：</br><span  class="word c_999">{$activity.activity_limit}</span></p>

                    <p class="word c_999"><span class="right"> 发布时间：{$activity.create_time}</span></p>
            </li>
                </volist>

            </ul>
        </div>
    </div>
</block>
<block name="css"></block>
<block name="js">
    <script type="text/javascript">
        $(function(){
            var issend = false;
           $('.delete').click(function(e){
               e.preventDefault();
               if(issend) return false;
               issend = true;
               var _this = this;
               var id = $(this).data('id');
               if(!id){
                   issend = false;
                   layer_msg('参数错误!');
                   return false;
               }
               layer_confirm('确定删除该活动吗?',function(){
                   //发送数据
                   $.post("{:U('delete_activity')}",{id:id},function (data){
                       issend = false;
                       if(data.code==0){
                           if(data.code==0){
                               layer_msg('删除成功',2,function(){
                                   //删除该节点
                                   $(_this).closest('li').remove();
                               });
                           }else{
                               layer_msg(data.msg);
                           }
                       }
                   },'json');
               },function(){
                   issend = false;
               });
           });
        });
    </script>
</block>